package com.power.project.api;

import com.power.common.domain.ResponseDTO;

import com.power.project.model.bo.PasswordBO;
import com.power.project.model.vo.AccountVo;

import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

public interface IAccountFeign {

    /**
     * 用户登录
     */
    @GetMapping("/account/login")
    ResponseDTO<AccountVo>  login(@RequestParam @NotEmpty @NotNull String userid, @RequestParam @NotEmpty @NotNull String password);

    /**
     * 用户登出  session中token登出 无需userid
     *
     * @param
     * @return
     */
    @GetMapping("/account/logout")
    ResponseDTO logout();

    /**
     * 用户是否登录
     *
     * @param
     * @return
     */
    @GetMapping("/account/isLogin")
    ResponseDTO isLogin();

    /**
     * 修改密码
     *
     * @param
     * @return
     */
    @PostMapping("/account/notify")
    ResponseDTO notifyPassword(@RequestBody PasswordBO passwordBO);
}
